//同步创建的表
const seq = require('./connection/mysql_connect');

require('./models');

//测试连接是否成功
seq.authenticate().then(() => {
    console.log('MySQL server is connected completely.');
}).catch((error) => {
    console.log('MySQL server is failed to be connected. Error information is below Error' + error);
})
//同步数据库表的方法
seq.sync({
     //force: true //强制同步数据库表
}).then(()=> {
    console.log('The table been synchronised into database successfully')
    process.exit(); //关闭进程
})
